.TH std::messages 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::messages \- std::messages

.SH Synopsis
   Defined in header <locale>
   template<

       class CharT

   > class messages;

   Class template std::messages is a standard locale facet that encapsulates retrieval
   of strings from message catalogs, such as the ones provided by GNU gettext or by
   POSIX catgets.

   The source of the messages is implementation-defined.

   std-messages-inheritance.svg

                                   Inheritance diagram

.SH Specializations

   The standard library is guaranteed to provide the following specializations (they
   are required to be implemented by any locale object):

   Defined in header <locale>
   std::messages<char>    accesses narrow string message catalog
   std::messages<wchar_t> accesses wide string message catalog

.SH Member types

   Member type Definition
   char_type   CharT
   string_type std::basic_string<CharT>

.SH Member functions

   constructor   constructs a new messages facet
                 \fI(public member function)\fP
   destructor    destructs a messages facet
                 \fI(protected member function)\fP
   open          invokes do_open
                 \fI(public member function)\fP
   get           invokes do_get
                 \fI(public member function)\fP
   close         invokes do_close
                 \fI(public member function)\fP

.SH Member objects

   static std::locale::id id id of the locale
                             \fI(public member object)\fP

.SH Protected member functions

   do_open   opens a named message catalog
   \fB[virtual]\fP \fI(virtual protected member function)\fP
   do_get    retrieves a message from an open message catalog
   \fB[virtual]\fP \fI(virtual protected member function)\fP
   do_close  closes a message catalog
   \fB[virtual]\fP \fI(virtual protected member function)\fP

Inherited from std::messages_base

   Type    Definition
   catalog /* unspecified signed integer type */

.SH See also

   messages_base   defines messages catalog type
                   \fI(class)\fP
   messages_byname represents the system-supplied std::messages for the named locale
                   \fI(class template)\fP
